package com.xuexiang.yoyo.entity;

import com.xuexiang.yoyo.constant.HesAppStatic;

import java.io.Serializable;

public class Device  implements Cloneable, Serializable {
    private static final long serialVersionUID = 7101340920005056481L;
    private String deviceCode;
    private String protocal;
    private String communication;
    private String baud;
    private String createTime;
    private String username;

    public static Device createCurrent() {
        Device device = new Device();
        device.setDeviceCode(HesAppStatic.getReadingDeviceId());
        device.setProtocal(HesAppStatic.getSelectProtocal());
        device.setCommunication(HesAppStatic.getSelectCommunication());
        device.setCreateTime(System.currentTimeMillis()+"");
        device.setUsername(HesAppStatic.getUsername());
        return device;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getBaud() {
        return baud;
    }

    public void setBaud(String baud) {
        this.baud = baud;
    }

    public String getProtocal() {
        return protocal;
    }

    public void setProtocal(String protocal) {
        this.protocal = protocal;
    }

    public String getCommunication() {
        return communication;
    }

    public void setCommunication(String communication) {
        this.communication = communication;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}
